<!DOCTYPE html>
<html>
<head>
	<title>角色维护页面</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript">
	    var path = window.document.location.href;
		var pathName = window.document.location.pathname;
		var hostPath = path.substring(0, path.indexOf(pathName));
		var projectName = pathName.substring(0, pathName.substr(1).indexOf("/") + 1);
		document.write('<scr' + 'ipt src="' + projectName + '/js/html/header.js"></scr'+'ipt>');
    </script>
</head>
<body>
	<table id="dg" style="width:auto;height:auto">
		<thead>
			<tr>
				<th field="id" data-options="hidden:true">角色ID</th>
				<th field="roleCode" 	width="100" align="right"
					data-options="
					sortable:true,
					remoteSort:false,
					editor:{
						type:'validatebox',
						options:{
							required:true
						}
					}">角色代码</th>
				<th field="roleName" 	width="100" align="right"
					data-options="
					sortable:true,
					remoteSort:false,
					editor:{
						type:'validatebox',
						options:{
							required:true
						}
					}">角色名称</th>
				
				<th field="status" 	width="100" align="right"
					data-options="
					sortable:true,
					remoteSort:false,
					editor:{
						type:'validatebox',
						options:{
							required:true
						}
					}"
					>角色状态</th>
			</tr>
		</thead>
	</table>
	<div id="dg-buttons" style="height:auto">
		<div style="margin-bottom:5px">
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" 	onclick="dlgAdd()">新增</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" 	onclick="dlgEdit()">修改</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-excel',plain:true" 	onclick="dlgExport()">导出</a>
		</div>
		<div>
			<span>角色代码:</span>
			<input type="text" id="roleCode" name="roleName" class="easyui-validatebox" />
			<span>角色名称:</span>
			<input type="text" id="roleName" name="roleName" class="easyui-validatebox" />
			<span>角色状态:</span>
			<input type="text" id="status" name="status" class="easyui-combobox" />
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" onclick="dgop.find()">查询</a>
		</div>
	</div>
	
	<div id="dlg" class="easyui-dialog" closed="true" style="width:730px;height:280px;padding:10px 10px;" buttons="#dlg-buttons">
    	<form method="post" id="fm">
        	<table cellspacing="8px;">
            	<td><input id="id" name="id" style="display:none" required="true" ></td>
                <tr>
                	<td>角色代码：</td>
                    <td>
                     	<input type="text" id="roleCode" name="roleCode"
                     	class="easyui-validatebox" required="true" >&nbsp;
                    	<span style="color: red">*</span>
                    </td>
            	</tr>
				<tr>
					<td>角色名称：</td>
					<td>
						<input type="text" id="roleName" name="roleName"
							   class="easyui-validatebox" required="true" >&nbsp;
						<span style="color: red">*</span>
					</td>
				</tr>
				<tr>
					<td>角色状态：</td>
					<td>
						<input type="text" id="status" name="status"
							   class="easyui-combobox" required="true" />&nbsp;
						<span style="color: red">*</span>
					</td>
				</tr>
        	</table>
    	</form>
    </div>
    <div id="dlg-buttons">
    	<a href="javascript:dlgSave()" class="easyui-linkbutton" iconCls="icon-ok">保存</a> 
        <a href="javascript:dlgClose()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
	</div>

	<script>
		var initd = {
			queryDataURL:"/system/roleinfo/query",//查询URL
			saveDataURL:"/system/roleinfo/save",//保存URL
			removeDataURL:"/system/roleinfo/remove",//删除URL
			dg:$('#dg'),
			dataDicList:{'STATUS':['status']}//需加载的 DATADIC 字典名+作用的字段名
		};
	</script>
</body>
</html>

